#include <iostream>
#include "Rational.h"

int main() {
	Rational a(1,2);
	a.out();
	a += Rational(1,1);
	
	a.out();
	a-=1;
	
	Rational b(3,5);
	a.out();
	a /= b;
	a.out();

	a *= 6;
	a.out();

	Rational c(37,13);
	c.reduce();
	(-c).out();
	c.out();

	std::cout << (double) c << "\n";
	c++;
	c.reduce();
	c.out();
	c--;
	c.out();

	std::cout << (Rational(1,2) < Rational(0,2)) << "\n";
	std::cout << (Rational(1,2) > Rational(0,2)) << "\n";
	std::cout << (Rational(1,2) > Rational(1,2)) << "\n";
	std::cout << (Rational(1,2) != Rational(1,2)) << "\n";
	std::cout << (Rational(1,2) >= Rational(1,2)) << "\n";
		
	a = Rational(1,2);
	b = Rational(3,2);
	c = a + b;
	c.out();
	Rational d(0);
	d = b - a;
	d.out();
	d = b/a;
	d.out();
	d = 5;
	d.out();

	return 0;
}